package kgame5.k3d.core.render {
import kgame5.k3d.core.camera.Camera3D;
import kgame5.k3d.core.obj3d.node3d.group3d.World3D;

/**
 * @author kk
 */
public class RenderEngine {
	
	public var session : RenderSessionData = new RenderSessionData();

	public function renderScene(world : World3D,camera : Camera3D) : void {
		
		session.world = world;
		session.camera = camera;
		
		//统计数据
		session.stati.start();
		
		//--摄象机更新
		camera.Update(); 
		session.Mwc =camera.Mwc;
		session.isMwcDirty = camera.isDirty;
		
		//--世界更新并渲染
		world.Update(session,false);//经过优化的更新方式,只能绕y轴旋转
		
		//统计数据
		session.stati.end();
		
	}
}//end of class
}
